//
//  ViewController.m
//  UI12_Model
//
//  Created by ChuXiang on 15/11/11.
//  Copyright © 2015年 ChuXiang. All rights reserved.
//

#import "ViewController.h"
#import "RootModel.h"
@interface ViewController ()
@property (nonatomic, retain) RootModel *root;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    NSArray *array = [[NSArray alloc] initWithContentsOfFile:@"/Users/YTR/Downloads/mov.plist"];
//    NSLog(@"%@", array);

//    _root = [[RootModel alloc] init];
    
    for (NSDictionary *dic in array) {
        _root = [[RootModel alloc]initWithData:dic];
        [_root setValuesForKeysWithDictionary:dic];
//        NSLog(@"%@", _root);
//        NSLog(@"%@", _root.title);
        ShowModel *show = _root.dataSource[0];
        NSLog(@"%@", show.title);
    }



}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
